<?php
require_once '../../serum/app/Main.php';

umask(0);
Main::_initialize('admin');

function getCurrentVersionEntry($params) {
	Core_Updater_Remote::setParams($params);
	
	return Core_Updater_Remote::getCurrentVersion();
}

function migrateEntry($params) {
    Core_Updater_Remote::setParams($params);
    
    return Core_Updater_Remote::migrate();
}

ini_set("soap.wsdl_cache_enabled", "0"); 
$server = new SoapServer(Core_IO_PATH::combine(PROJECT_CONFIG_PATH, 'updater.wsdl')); 
$server->addFunction("getCurrentVersionEntry"); 
$server->addFunction("migrateEntry"); 
$server->handle(); 

?>